#include <iostream>
using namespace std;

bool isprime(int m)
{
  int i;
  for (i = 2; m % i != 0; i++);
  return i == m;
}

int main()
{
  int totle = 0, m;

  for (m = 3; totle < 10; m++)
  {
    if (isprime(m) && isprime(m + 2))
    {
      cout << "(" << m << "," << m + 2 << ")" << endl;
      totle++;
    }
  }

  system("pause");
  return 1;
}